用 ExifTool 工具整理照片

您所在的位置:网站首页 kali exiftool 用 ExifTool 工具整理照片

用 ExifTool 工具整理照片

2024-03-15 19:26| 来源: 网络整理| 查看: 265

用 ExifTool 工具整理照片 XiaO / 2021-12-30

ExifTool 可快速安全地批量移动、复制、重命名、分组、提取预览 JPG 或标记照片。

工具安装 # 命令 brew install exiftool 照片信息

文件信息与照片 Metadata 信息是不同的。文件信息是由电脑系统记录并展示的其在存储硬盘上的信息,而照片 Metadata 信息是在拍照时由相机系统嵌入照片的。其有三种标准, XEIF、XMP 与 IPTC。

# 命令 exiftool path/to/file # 结果:存储硬盘上关于该照片的时间信息 ExifTool Version Number : 12.30 File Modification Date/Time : 2021:12:29 22:22:08+01:00 File Access Date/Time : 2021:12:29 22:48:27+01:00 File Inode Change Date/Time : 2021:12:29 22:48:25+01:00 # 结果:Metadata 中关于该照片的时间信息 Date/Time Original : 2016:06:16 23:53:08 Create Date : 2016:06:16 23:53:08 GPS Date Stamp : 2016:06:16 Digital Creation Time : 23:53:08 Digital Creation Date : 2016:06:16 Date Created : 2016:06:16 Time Created : 23:53:08 Date/Time Created : 2016:06:16 23:53:08 Digital Creation Date/Time : 2016:06:16 23:53:08 # 命令 exiftool -s -G path/to/file # 说明 -s 显示编写 ExifTool commands 时所用的名称 -G 显示该元数据标签所属的元数据组 # 结果 [File] FileModifyDate : 2021:12:29 22:22:08+01:00 [File] FileAccessDate : 2021:12:29 22:48:27+01:00 [File] FileInodeChangeDate : 2021:12:29 22:48:25+01:00 [EXIF] ModifyDate : 2016:06:16 23:53:08 [EXIF] DateTimeOriginal : 2016:06:16 23:53:08 [EXIF] CreateDate : 2016:06:16 23:53:08 [EXIF] GPSDateStamp : 2016:06:16 [IPTC] DigitalCreationTime : 23:53:08 [IPTC] DigitalCreationDate : 2016:06:16 [IPTC] DateCreated : 2016:06:16 [IPTC] TimeCreated : 23:53:08 [XMP] CreateDate : 2016:06:16 23:53:08 [XMP] ModifyDate : 2016:06:16 23:53:08 [XMP] DateCreated : 2016:06:16 23:53:08 [Composite] SubSecCreateDate : 2016:06:16 23:53:08.642 [Composite] SubSecDateTimeOriginal : 2016:06:16 23:53:08.642 [Composite] DateTimeCreated : 2016:06:16 23:53:08 [Composite] DigitalCreationDateTime : 2016:06:16 23:53:08

显示照片的所有日期时间信息

# 命令 exiftool -AllDates -s -G path/to/file # -AllDates 显示所有含有日期的标签 # 命令 exiftool -time:all -s -G path/to/file #-time:all 显示所有含有时间的标签

查找符合条件的照片

# 命令,查找 exif 分组中没有 DateTimeOriginal 标签的照片 exiftool -r -G -s -filename -if 'not $exif:DateTimeOriginal' path/to/fileORfolder # 命令,查找 所有 分组中没有 CreateDate 标签的照片 exiftool -r -G -s -filename -if 'not CreateDate' path/to/fileORfolder # 说明 -r 对源文件夹及其子文件夹中的所有照片执行操作 -filename 显示文件名称 -if 引入条件参数以便设置条件 'not $exif:DateTimeOriginal' 具体的条件,即没有 `exif:DateTimeOriginal` 标签的照片 $exif:DateTimeOriginal 选中某个分组中的某个标签,作为变量使用 -exif:DateTimeOriginal 引入某个分组中的某个标签,作为操作参数,对其进行操作

添加或修改标签值

# 给 EXIF:DateTimeOriginal 标签添加具体的值 exiftool '-EXIF:DateTimeOriginal="2021:11:10 10:41:20"' -r path/to/fileORfolder # 将标签 DateTimeOriginal 的值复制给标签 CreateDate exiftool '-exif:DateTimeOriginal>CreateDate' -r path/to/fileORfolder # 将标签 CreateDate 的值复制给标签 DateTimeOriginal exiftool '-exif:DateTimeOriginal


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3